package String;

public class MatchesDemo {
    public static void main(String[] args) {
      //  邮箱的正则表达式[a-zA-ZO-9_]+@[a-zA-Z0-9]+(\.[a-zA-Z]+)+
              String email=  "wangkj@tedu.cn.com";
              String regex="[a-zA-Z0-9_]+@[a-zA-Z0-9]+(\\.[a-zA-Z]+)+";
              //使用regex匹配email是否匹配
              boolean match=email.matches(regex);
              if(match){
                  System.out.println("匹配成功");
              }else{
                  System.out.println("匹配失败");
              }








    }


}
